<div id="successMessage" class="successMessageText">
	<s:actionmessage/>
</div>

<div id="errorMessage" class="errorMessageText">
	<s:actionerror/>
	<s:fielderror />
</div>

<script>
	var div = document.getElementById("errorMessage");
	if(div!=null){
		if(div.innerHTML.toLowerCase().indexOf("ul")!=-1){
			div.style.display = "block";
		}else{
			div.style.display = "none";
		}
	}

	var okDiv = document.getElementById("successMessage");
	if(okDiv!=null){
		if(okDiv.innerHTML.toLowerCase().indexOf("ul")!=-1){
			okDiv.style.display = "block";
		}else{
			okDiv.style.display = "none";
		}
	}
</script>